/*
 * Created by JFormDesigner on Thu Nov 03 10:48:57 CST 2022
 */

package org.example.GUI;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import org.example.Parent.realInstrument;
import org.example.functions.*;

/**
 * @author Brainrain
 */
public class Window extends JFrame {
    public Window() {
        initComponents();
    }

    private void okButtonMouseClicked(MouseEvent e) {
        // TODO add your code here
        System.exit(0);

    }

    private void cancelButtonMouseClicked(MouseEvent e) {
        // TODO add your code here
        System.exit(0);
    }


    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        dialogPane = new JPanel();

        //======== this ========
        setTitle("汽车表盘");
        setMinimumSize(new Dimension(740, 460));
        setMaximizedBounds(new Rectangle(0, 0, 740, 460));
        Container contentPane = getContentPane();
        contentPane.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));

        //======== dialogPane ========
        {
            dialogPane.setMaximumSize(new Dimension(740, 460));
            dialogPane.setMinimumSize(new Dimension(740, 460));
            dialogPane.setPreferredSize(new Dimension(830, 630));
            dialogPane.setLayout(new GridLayout(2, 2));
        }
//        dialogPane.add(new Clock02(0,"", realInstrument.Mode.wholeCircle,60));
//        dialogPane.add(new Data(0,"D:\\java-experiment\\java02\\src\\main\\resources\\CarPlane1.jpg", realInstrument.Mode.semiCircle ,1000));
//        dialogPane.add(new Clock02(0,"", realInstrument.Mode.wholeCircle,60));
        dialogPane.add(new MhpDashboard(0,"D:\\ECLIPSE\\java-experiment\\java02\\src\\main\\resources\\CarPlane1.jpg", realInstrument.Mode.semiCircle ,100));
        dialogPane.add(new SpeedDashboard(0,"D:\\ECLIPSE\\java-experiment\\java02\\src\\main\\resources\\speed.jpg", realInstrument.Mode.wholeCircle ,10));
        dialogPane.add(new AirDashboard(0,"D:\\ECLIPSE\\java-experiment\\java02\\src\\main\\resources\\air.jpg", realInstrument.Mode.semiCircle,60));
        contentPane.add(dialogPane);
        pack();
        setLocationRelativeTo(null);
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JPanel dialogPane;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
